package Entity;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class CreatEntityManager {
    private static EntityManagerFactory entityManagerFactory;
    static {
        entityManagerFactory= Persistence.createEntityManagerFactory("MyJPADemoPU");
    }
    public static EntityManager GetEntityManager()
    {
        return entityManagerFactory.createEntityManager();
    }
}
